#include<stdio.h>
int main()
{
    //freopen("in.txt","r",stdin);
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    printf("%d",a/10*2 + b/10*3 + c/10*5);
}